<?php
//for($i=1;$i<200;$i++){
//    $client = new swoole_client(SWOOLE_SOCK_TCP);//创建swoole tcp客户端
//    $client->connect('127.0.0.1', 9511, 10) or die("连接失败");//连接server
//    $sql = "select * from pay_order where id={$i}";
//    $client->send($sql."\r\n\r\n");//发送要执行的sql
//    var_dump($client->recv());
//    $client->close();//关闭连接
//
//}

$i = mt_rand(1,99999);
$client = new Swoole\Http\Client('127.0.0.1', 9511);//创建swoole tcp客户端
$client->post('/post.php', array("sql" => 'select * from pay_order where id={$i}'));
echo $client->body;
$client->close();
